package com.share.design.status.demo01;

/**
 * 4 - 派送中
 * @author caifan
 * @since 2022/11/6
 */
public class Delivering implements PackageState {
    // 单例
    private static Delivering instance = new Delivering();

    private Delivering() {}

    public static Delivering getInstance() {
        return instance;
    }


    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("4-派送中");
        ctx.setCurrentState(WaitForPickUp.getInstance());
    }
}
